{% extends 'django_tables2/table.html' %}
{% load django_tables2 %}
{% load i18n %}

{% block table.thead %}
<caption>
    {% block table.caption %}
        <h3 class="pull-left">
            {% if table.icon %}
              <i class="icon-{{ table.icon }} icon-large"></i>
            {% endif %}
            {{ table.get_caption_display }}
        </h3>
    {% endblock %}
</caption>
<thead>
    <tr>
    {% for column in table.columns %}
        {% if column.orderable %}
        <th {{ column.attrs.th.as_html }}><a href="{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}">{{ column.header }} <i class="icon-"></i></a></th>
        {% else %}
        <th {{ column.attrs.th.as_html }}>{{ column.header }}</th>
        {% endif %}
    {% endfor %}
    </tr>
</thead>
{% endblock table.thead %}

{% block pagination %}
{% with page_obj=table.page paginator=table.paginator %}
    {% include "dashboard/partials/pagination.html" %}
{% endwith %}
{% endblock pagination %}
